/*
 * Project it.battlehorse.rcp.tools
 * Created on Nov 18, 2005
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 * 
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 *
 * A copy of the LGPL is available also at
 * http://www.gnu.org/copyleft/lesser.html
 * 
 */ 
package it.battlehorse.rcp.tools.perspectives;

import it.battlehorse.rcp.tools.log.LogActivator;
import it.battlehorse.rcp.tools.views.actorlist.ActorListView;

import org.eclipse.ui.IFolderLayout;
import org.eclipse.ui.IPageLayout;
import org.eclipse.ui.IPerspectiveFactory;

/**
 * The perspective which will contain the Actors.
 * 
 * @author battlehorse
 * @since Nov 18, 2005
 */
public class ActorPerspective implements IPerspectiveFactory {
	
	/**
	 * The perspective id, whose value is {@value }
	 */
	public static final String ID_PERSPECTIVE = "it.battlehorse.rcp.tools.perspectives.actorperspective";
	
	/**
	 * This id of the folder which will contains the stacked actors views,
	 * whose value is {@value }
	 */
	public static final String ID_ACTORS_FOLDER = "it.battlehorse.rcp.tools.actors.folder";
	
	private IFolderLayout folder;

	public void createInitialLayout(IPageLayout layout) {
		
		layout.setEditorAreaVisible(false);
        layout.addView(
            ActorListView.ID_VIEW,
            IPageLayout.LEFT,
            0.4f,
            IPageLayout.ID_EDITOR_AREA); 
        
        
        layout.addView(
        	LogActivator.ACTOR_LOG_VIEW_ID,
        	IPageLayout.BOTTOM,
        	0.7f,
        	ActorListView.ID_VIEW); 
        
                
        folder = layout.createFolder(
        	ID_ACTORS_FOLDER,
        	IPageLayout.RIGHT,
        	0.7f,
        	IPageLayout.ID_EDITOR_AREA);
        
	}
	
	public IFolderLayout getActorsFolder() {
		return folder;
	}
}
